﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace UAC.Operation
{
    public class TeamRoleDef
    {
        public int ID { get; set; }
        public int TeamDefID { get; set; }
        public int TeamRoleDefID { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
        public int Status { get; set; }
        public int IsSystem { get; set; }

        public TeamRoleDef() { }

        public TeamRoleDef(DataRow dr)
        {
            this.ID = Convert.ToInt32(dr["id"]);
            this.Name = dr["name"].ToString();
            this.Description = dr["description"].ToString();
            this.Status = Convert.ToInt32(dr["status"]);
            this.IsSystem = Convert.ToInt32(dr["issystem"]);
            this.TeamDefID = Convert.ToInt32(dr["teamdefid"]);
            this.TeamRoleDefID = Convert.ToInt32(dr["teamroledefid"]);
        }

        public override string ToString()
        {
            return string.Format("{0}-{1}", this.TeamRoleDefID, this.Description);
        }
    }
}
